package com.zhangxun.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhangxun.domain.SysLog;
import com.zhangxun.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api
@RestController
@RequestMapping("/sys/log")
public class SysLogController {

    @Autowired
    private SysLogService sysLogService;


    @GetMapping("/page")
    @ApiOperation("查询所有日志")
    @PreAuthorize("hasAuthority('sys:log:page')")
    public Page<SysLog> page(Page<SysLog> page){
       return sysLogService.page(page);
    }
}
